package map;

import map.graph.MapGraph;

import com.taxi.server.carsearch.graph.Node;
import com.taxi.server.carsearch.graph.Way;

public class MapDriver {

	public static void main(String[] args) {
		MapGraph graph = MapGraphDatabase.getInstance().loadMapGraph();
		System.out.println(graph.getNodes().size() + " nodes loaded.");
		System.out.println(graph.getWays().size() + " ways loaded.");
		Node n1 = graph.getNode(416104896);

		Node n2 = n1.getWays().get(0).getNode2();
		Way w = n1.getWays().get(0);
		System.out.println(w);
		System.out.println(n1);
		System.out.println(n2);
		MapGraphDatabase.getInstance().addOperativeData(w, 10);

		System.out.println(w.getLength());
		System.out.println(MapGraphDatabase.getInstance().getTime(w));

		MapGraphDrawer drawer = new MapGraphDrawer(graph);
		drawer.setVisible(true);

		// MapGraphDrawer drawer2 = new
		// MapGraphDrawer(graph.subGraph(graph.minlat + 0.1, graph.minlon + 0.1,
		// graph.maxlat - 0.1, graph.maxlon - 0.1));
		// drawer2.setVisible(true);

		System.out.println("Complete");

	}

}
